<!--
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
-->
<template>
  <div class="business-map-data-info">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="数据信息" name="Info">
        <Data :modelId="props.modelId" :versionList="props.versionList" :modelName="modelName" v-if="activeName == 'Info'" />
      </el-tab-pane>
      <el-tab-pane label="数据溯源" name="Source">
        <Source :sourceId="sourceId" v-if="activeName == 'Source'" />
      </el-tab-pane>
    </el-tabs>
    <div class="return">
      <el-button type="primary" size="small" @click="goBack"> 返回 </el-button>
    </div>
  </div>
</template>

<script setup name="DataInfo">
import Data from "./Data.vue";
import Source from "./Source.vue";
const props = defineProps(['modelId', 'rowData', 'sourceId', 'versionList', 'modelName']);
const emits = defineEmits(['handleEvent']);
const activeName = ref('Info');
const handleClick = () => {}
const goBack = () => {
  emits('handleEvent', { 
    component: 'MapDetail', 
    row: props.rowData
  });
}
</script>

<style lang="scss" scoped>
.business-map-data-info {
  padding: 20px;
  .return {
    display: flex;
    justify-content: center;
    padding: 10px;
  }
}
</style>
